package com.bw.xiaosy.shiro;

/**
 * @author Xiaosy
 * @date 2017-03-20 16:57
 */
public class Result {

    private Integer c;

    private Data d;

    public class Data{
        private String e;
        private String m;

        public String getE() {
            return e;
        }

        public void setE(String e) {
            this.e = e;
        }

        public String getM() {
            return m;
        }

        public void setM(String m) {
            this.m = m;
        }
    }

    public Result(AuthorizationStatus status)
    {
        this.c = status.getCode();
        Data data = new Data();
        data.setM(status.getMsg());
        data.setE(status.getException());
        this.d = data;
    }

    public Result(Integer c, String d) {
        this.c = c;
        this.d.setM(d);
    }

    public Integer getC() {
        return c;
    }

    public void setC(Integer c) {
        this.c = c;
    }

    public Data getD() {
        return d;
    }

    public void setD(Data d) {
        this.d = d;
    }
}
